/****
 **产品模板数据
 * ***/
class GoodsInfoBean {
	constructor() {
		//新建产品时间
		this.atime = "";
		//条码
		this.barcode = "";
		//品牌id列表
		this.brands = null;
		//显示的品牌文本
		this.brandsName = null;
		//显示的品牌文本
		this.brands_title = "";
		//起订量
		this.buymin = "0";
		//分类id列表
		this.category = null;
		//分类名称
		this.categoryname = "";
		//实际的一级分类id
		this.catid = "0";
		//实际的二级分类id
		this.catid1 = "0";
		//实际的三级分类id
		this.catid2 = "0";
		//产品详情？
		this.comment = null;
		//成本结构体
		this.costInfo = null;
		//显示的成本
		this.cost_bw = "0";
		//成本报价方式
		this.cost_quote_type = "0";
		//显示的成本
		this.cost_title = "0";
		//企业id
		this.cpid = "0";
		//更多详情列表，结构体
		this.desc = null;
		//编辑时间
		this.etime = "0";
		//产品id
		this.id = "";
		//显示产品大图 oss
		this.imgs = null;
		//基础图片 路径包含 d目录开头的，
		this.imgs_base = null;
		//显示产品小图 oss
		this.imgs_s = null;
		//置顶
		this.istop = "0";
		//货号
		this.item_no = "";
		//货号MD5
		this.item_no_md516 = "";
		//最小单位
		this.minunitname = "";
		//采购数量？
		this.num_cg = "";
		//销售数量
		this.num_sell = "";
		//app上架
		this.onsale = "";
		//女人帮上架
		this.onsale_nrb = "";
		//显示的上架标题
		this.onsale_title = "";
		//云店上架
		this.onsale_yd = "";
		//显示的价格区间
		this.price_bw = "";
		//产品的默认价格档
		this.price_i = "";
		//产品报价方式 0：无关联 ，1：按单位，2：按规格
		this.price_quote_type = "";
		//显示的价格标题
		this.price_title = "";
		//价格结构体
		this.priceinfo = null;

		//1:不显示初始库存，非1显示初始库存
		this.isQty = null,

			//库存数
			this.qty = null;
		//是否有库存（）
		this.qty_ck = null;
		//警戒库存数
		this.qty_warn = "";
		//？
		this.spec_ckls = null;
		//用到的规格列表结构体
		this.spec_ls = null;
		//用到显示的规格名称
		this.spec_ls_name = "";
		//状态：1：启用，其他：停用。
		this.status = "";
		//标签的id列表
		this.tags = null;
		//显示的标签名称
		this.tagsName = null;
		//显示的标签名称
		this.tags_title = "";
		//产品模板时间
		this.time_tpl = "";
		//不用的
		this.timestr = "";
		//不用的
		this.timestr_cg = "";
		//不用的
		this.timestr_sell = "";
		//产品名称
		this.title = "";
		//分享显示文本
		this.txt_share = "";
		//经手人id
		this.uid_cp = "";
		//经手人名称
		this.uid_cpname = "";
		//选中的单结构体
		this.unit_ls = null;
		// 供货商名称
		this.supp_name = ''
		// 供货商id
		this.suppid = ''

		this.onsale_yds = null;

		this.img_ls = null;

		this.specgd_id = '';

		this.txt_title = ""; //服务描述

		this.unit = '' //服务单位

		this.outday_ids = '' //服务有效期

		this.pricec = '' //服务划线价

		this.outday_i = '' //服务默认有效期

	}

	setData(data, imgLs) {
		if (!data) return;
		if (data.outday_i)
		this.outday_i = data.outday_i;

		if (data.outday_ids)
			this.outday_ids = data.outday_ids;

		if (data.pricec)
			this.pricec = data.pricec;

		if (data.unit)
			this.unit = data.unit;

		if (data.txt_title)
			this.txt_title = data.txt_title;

		if (data.specgd_id)
			this.specgd_id = data.specgd_id;

		if (data.supp_name)
			this.supp_name = data.supp_name;

		if (data.suppid)
			this.suppid = data.suppid;

		if (data.atime)
			this.atime = data.atime;

		if (data.barcode)
			this.barcode = data.barcode;

		if (data.brands)
			this.brands = data.brands;

		if (data.brandsName)
			this.brandsName = data.brandsName;

		if (data.brands_title)
			this.brands_title = data.brands_title;

		if (data.buymin)
			this.buymin = data.buymin;

		if (data.category)
			this.category = data.category;

		if (data.categoryname)
			this.categoryname = data.categoryname;

		if (data.catid)
			this.catid = data.catid;

		if (data.catid1)
			this.catid1 = data.catid1;

		if (data.catid2)
			this.catid2 = data.catid2;

		if (data.comment)
			this.comment = data.comment;

		if (data.costInfo)
			this.costInfo = data.costInfo;

		if (data.cost_bw)
			this.cost_bw = data.cost_bw

		if (data.cost_quote_type)
			this.cost_quote_type = data.cost_quote_type;

		if (data.cost_title)
			this.cost_title = data.cost_title;

		if (data.cpid)
			this.cpid = data.cpid;

		if (data.desc)
			this.desc = data.desc;

		console.log("GoodsInfoBean:data.desc==========:", data.desc);

		if (data.etime)
			this.etime = data.etime;

		if (data.id)
			this.id = data.id;

		if (data.imgs)
			this.imgs = data.imgs;

		if (data.imgs_base)
			this.imgs_base = data.imgs_base;

		if (data.imgs_s)
			this.imgs_s = data.imgs_s;

		if (data.istop)
			this.istop = data.istop;

		if (data.item_no)
			this.item_no = data.item_no

		if (data.item_no_md516)
			this.item_no_md516 = data.item_no_md516;

		if (data.minunitname)
			this.minunitname = data.minunitname;

		if (data.num_cg)
			this.num_cg = data.num_cg;

		if (data.num_sell)
			this.num_sell = data.num_sell

		if (data.onsale)
			this.onsale = data.onsale;

		if (data.onsale_nrb)
			this.onsale_nrb = data.onsale_nrb;

		if (data.onsale_title)
			this.onsale_title = data.onsale_title;

		if (data.onsale_yd)
			this.onsale_yd = data.onsale_yd;

		if (data.price_bw)
			this.price_bw = data.price_bw;

		if (data.price_i)
			this.price_i = data.price_i;

		if (data.price_quote_type)
			this.price_quote_type = data.price_quote_type;

		if (data.price_title)
			this.price_title = data.price_title;

		if (data.priceinfo)
			this.priceinfo = data.priceinfo;

		if (data.isqty)
			this.isQty = data.isqty;

		if (data.qty)
			this.qty = data.qty;

		if (data.qty_ck)
			this.qty_ck = data.qty_ck;

		if (data.qty_warn)
			this.qty_warn = data.qty_warn;

		if (data.spec_ckls)
			this.spec_ckls = data.spec_ckls;

		if (data.spec_ls)
			this.spec_ls = data.spec_ls;

		if (data.spec_ls_name)
			this.spec_ls_name = data.spec_ls_name;

		if (data.status)
			this.status = data.status;

		if (data.tags)
			this.tags = data.tags;

		if (data.tagsName)
			this.tagsName = data.tagsName;

		if (data.tags_title)
			this.tags_title = data.tags_title;

		if (data.time_tpl)
			this.time_tpl = data.time_tpl;

		if (data.timestr)
			this.timestr = data.timestr;

		if (data.timestr_cg)
			this.timestr_cg = data.timestr_cg;

		if (data.timestr_sell)
			this.timestr_sell = data.timestr_sell;

		if (data.title)
			this.title = data.title;

		if (data.txt_share)
			this.txt_share = data.txt_share;

		if (data.uid_cp)
			this.uid_cp = data.uid_cp;

		if (data.uid_cpname)
			this.uid_cpname = data.uid_cpname;

		if (data.unit_ls)
			this.unit_ls = data.unit_ls;

		if (data.onsale_yds)
			this.onsale_yds = data.onsale_yds;


		console.log("setData():data.img_ls===========:", data, data.img_ls)
		if (data.img_ls)
			this.img_ls = data.img_ls;

		if (imgLs)
			this.img_ls = imgLs;

	}
}
export default GoodsInfoBean;